package com.rbac.admin.dto.system;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;

import java.util.List;

/**
 * 用户数据传输对象
 *
 * @author rbac-admin
 * @since 2024-07-18
 */
@Data
@Schema(description = "用户数据传输对象")
public class UserDTO {
    
    @Schema(description = "用户ID")
    private String id;
    
    @NotBlank(message = "用户名不能为空")
    @Size(min = 3, max = 20, message = "用户名长度应在3-20个字符")
    @Schema(description = "用户名")
    private String username;
    
    @Schema(description = "密码")
    private String password;
    
    @NotBlank(message = "昵称不能为空")
    @Size(min = 2, max = 20, message = "昵称长度应在2-20个字符")
    @Schema(description = "昵称")
    private String nickname;
    
    @Schema(description = "头像")
    private String avatar;
    
    @Schema(description = "性别：0-未知，1-男，2-女")
    private Integer sex;
    
    @Email(message = "邮箱格式不正确")
    @Schema(description = "邮箱")
    private String email;
    
    @Schema(description = "手机号")
    private String phone;
    
    @Schema(description = "状态：0-禁用，1-正常")
    private Integer status;
    
    @Schema(description = "主部门ID")
    private Integer mainDeptId;
    
    @Schema(description = "部门ID列表")
    private List<Integer> deptIds;
    
    @Schema(description = "角色ID列表")
    private List<String> roleIds;
    
    @Schema(description = "备注")
    private String remark;
}